package com.sgb.kjwl.model.entity.transport;

import android.os.Parcel;
import android.os.Parcelable;

import com.contrarywind.interfaces.IPickerViewData;

import java.io.Serializable;

/**
 * Describe:
 * Author:  yangLei
 * Date:    2021/5/21
 */
public class InvoiceRateEntity implements Parcelable, IPickerViewData {
    private String no;
    private String rate;
    private String invoiceRequest;
    private String name;

    protected InvoiceRateEntity(Parcel in) {
        no = in.readString();
        rate = in.readString();
        invoiceRequest = in.readString();
        name = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(no);
        dest.writeString(rate);
        dest.writeString(invoiceRequest);
        dest.writeString(name);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<InvoiceRateEntity> CREATOR = new Creator<InvoiceRateEntity>() {
        @Override
        public InvoiceRateEntity createFromParcel(Parcel in) {
            return new InvoiceRateEntity(in);
        }

        @Override
        public InvoiceRateEntity[] newArray(int size) {
            return new InvoiceRateEntity[size];
        }
    };

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(String rate) {
        this.rate = rate;
    }

    public String getInvoiceRequest() {
        return invoiceRequest;
    }

    public void setInvoiceRequest(String invoiceRequest) {
        this.invoiceRequest = invoiceRequest;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getPickerViewText() {
        return name;
    }
}
